# base image
FROM centos:7.6.1810

# MAINTAINER
LABEL Author="yanjingtu<yanjingtu2008@yeah.net>"

ENV  TIME_ZONE Asia/Shanghai
ENV  LC_ALL zh_CN.UTF-8

# add files
ADD CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo

# timezone
RUN echo "${TIME_ZONE}" > /etc/timezone \
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

# run command
# 1. 禁用自动扫描最快的镜像功能
# 2. 解决终端中文显示乱码的问题（装俩包、调整默认环境、开机自动设置环境）
RUN sed -i 's/enabled=1/enabled=0/g' /etc/yum/pluginconf.d/fastestmirror.conf \
&& yum install -y kde-l10n-Chinese glibc-common && yum clean all \
&& localedef -c -f UTF-8 -i zh_CN zh_CN.utf8 \
&& echo 'export LC_ALL=zh_CN.utf8' >> /etc/profile

# volumes
VOLUME ["/mnt"]

# main command
CMD ["/bin/bash"]

